#ifndef __MINER_H__
#define __MINER_H__
#pragma warning (disable : 4786)


#include "HiModules/mHiLFSM/Entity.h"
#include "HiModules/mHiLFSM/ScriptedStateMachine.h"

//the amount of nuggets a miner can carry
const int MaxNuggets         = 3;

//above this value a miner is sleepy
const int TirednessThreshold = 2;



class Miner : public Entity
{
private:

	ScriptedStateMachine<Miner>* m_pStateMachine;

	//how many nuggets the miner has in his pockets
	int                   m_iGoldCarried;

	//the higher the value, the more tired the miner
	int                   m_iFatigue;

public:

	Miner(std::string name);

	~Miner(){delete m_pStateMachine;}

	//this must be implemented
	void Update();

	int           GoldCarried()const{return m_iGoldCarried;}
	void          SetGoldCarried(int val){m_iGoldCarried = val;}
	void          AddToGoldCarried(int val);

	bool          Fatigued()const;
	void          DecreaseFatigue(){m_iFatigue -= 1;}
	void          IncreaseFatigue(){m_iFatigue += 1;}

	ScriptedStateMachine<Miner>* GetFSM()const{return m_pStateMachine;}
};


#endif